\hypertarget{class_network_1_1_grid_tcp_connection}{\section{Network\-:\-:Grid\-Tcp\-Connection$<$ Message\-Request, Message\-Response $>$ Class Template Reference}
\label{class_network_1_1_grid_tcp_connection}\index{Network\-::\-Grid\-Tcp\-Connection$<$ Message\-Request, Message\-Response $>$@{Network\-::\-Grid\-Tcp\-Connection$<$ Message\-Request, Message\-Response $>$}}
}


Wrapper around boost T\-C\-P socket A\-P\-I Messages model must be specified.  




{\ttfamily \#include $<$Grid\-Tcp\-Connection.\-h$>$}

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum {\bfseries M\-E\-S\-S\-A\-G\-E\-\_\-\-T\-Y\-P\-E} \{ {\bfseries R\-E\-Q\-U\-E\-S\-T}, 
{\bfseries R\-E\-S\-P\-O\-N\-S\-E}
 \}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_network_1_1_grid_tcp_connection_af32ec536d24ab4bb6686bb0b34f8aae3}{tcp\-::socket \& \hyperlink{class_network_1_1_grid_tcp_connection_af32ec536d24ab4bb6686bb0b34f8aae3}{Get\-Socket} ()}\label{class_network_1_1_grid_tcp_connection_af32ec536d24ab4bb6686bb0b34f8aae3}

\begin{DoxyCompactList}\small\item\em Getter for the connection socket. \end{DoxyCompactList}\item 
\hypertarget{class_network_1_1_grid_tcp_connection_aa6f6b2476598a51efa1306ed43428848}{void \hyperlink{class_network_1_1_grid_tcp_connection_aa6f6b2476598a51efa1306ed43428848}{Start} ()}\label{class_network_1_1_grid_tcp_connection_aa6f6b2476598a51efa1306ed43428848}

\begin{DoxyCompactList}\small\item\em Start the connection (socket switch to listen mode) \end{DoxyCompactList}\item 
\hypertarget{class_network_1_1_grid_tcp_connection_a02f3544ef2011def6fff384142c5bd4b}{void \hyperlink{class_network_1_1_grid_tcp_connection_a02f3544ef2011def6fff384142c5bd4b}{Stop} ()}\label{class_network_1_1_grid_tcp_connection_a02f3544ef2011def6fff384142c5bd4b}

\begin{DoxyCompactList}\small\item\em Close the connection (close the socket) \end{DoxyCompactList}\item 
\hypertarget{class_network_1_1_grid_tcp_connection_a1dd787e5ca70afc7a817904f12bbfb8e}{void \hyperlink{class_network_1_1_grid_tcp_connection_a1dd787e5ca70afc7a817904f12bbfb8e}{Write} (void $\ast$message, M\-E\-S\-S\-A\-G\-E\-\_\-\-T\-Y\-P\-E type)}\label{class_network_1_1_grid_tcp_connection_a1dd787e5ca70afc7a817904f12bbfb8e}

\begin{DoxyCompactList}\small\item\em Write a message on the socket. \end{DoxyCompactList}\item 
\hypertarget{class_network_1_1_grid_tcp_connection_ae3f283554281e7469091ced1d4efd59e}{{\bfseries Grid\-Tcp\-Connection} (asio\-::io\-\_\-service \&io\-\_\-service, \hyperlink{class_network_1_1_behavior_handler}{Behavior\-Handler}$<$ Message\-Request, Message\-Response $>$ $\ast$h)}\label{class_network_1_1_grid_tcp_connection_ae3f283554281e7469091ced1d4efd59e}

\item 
\hypertarget{class_network_1_1_grid_tcp_connection_a8cbe38b2c7a17c1fda1f25255931ab6e}{bool \hyperlink{class_network_1_1_grid_tcp_connection_a8cbe38b2c7a17c1fda1f25255931ab6e}{Is\-Task\-Sent} ()}\label{class_network_1_1_grid_tcp_connection_a8cbe38b2c7a17c1fda1f25255931ab6e}

\begin{DoxyCompactList}\small\item\em Is a task being proceed by connected client? \end{DoxyCompactList}\item 
\hypertarget{class_network_1_1_grid_tcp_connection_a0bf1e8373ea6e55019157fe0096d6dec}{void \hyperlink{class_network_1_1_grid_tcp_connection_a0bf1e8373ea6e55019157fe0096d6dec}{Send\-Task\-Sent} (bool sent)}\label{class_network_1_1_grid_tcp_connection_a0bf1e8373ea6e55019157fe0096d6dec}

\begin{DoxyCompactList}\small\item\em Tag the connection as being busy. \end{DoxyCompactList}\item 
\hypertarget{class_network_1_1_grid_tcp_connection_a1ac75642c6b0e7e626213607c615789e}{void \hyperlink{class_network_1_1_grid_tcp_connection_a1ac75642c6b0e7e626213607c615789e}{Check\-Is\-Alive} ()}\label{class_network_1_1_grid_tcp_connection_a1ac75642c6b0e7e626213607c615789e}

\begin{DoxyCompactList}\small\item\em Check if the connection is alive (try to write on the socket). \end{DoxyCompactList}\item 
\hypertarget{class_network_1_1_grid_tcp_connection_a82c95d76f7e680a4bd84872a9e43e72c}{bool \hyperlink{class_network_1_1_grid_tcp_connection_a82c95d76f7e680a4bd84872a9e43e72c}{Is\-Active} ()}\label{class_network_1_1_grid_tcp_connection_a82c95d76f7e680a4bd84872a9e43e72c}

\begin{DoxyCompactList}\small\item\em Is the connection alive. \end{DoxyCompactList}\item 
\hypertarget{class_network_1_1_grid_tcp_connection_a1044f005ed311e24680f8fb7dcbd6318}{std\-::string $\ast$ \hyperlink{class_network_1_1_grid_tcp_connection_a1044f005ed311e24680f8fb7dcbd6318}{Get\-Name} ()}\label{class_network_1_1_grid_tcp_connection_a1044f005ed311e24680f8fb7dcbd6318}

\begin{DoxyCompactList}\small\item\em Getter on the connection name. \end{DoxyCompactList}\item 
\hypertarget{class_network_1_1_grid_tcp_connection_a7236c6ac291df030f5dab9a4c0365da9}{bool {\bfseries operator==} (const \hyperlink{class_network_1_1_grid_tcp_connection}{Grid\-Tcp\-Connection}$<$ Message\-Request, Message\-Response $>$ \&connection)}\label{class_network_1_1_grid_tcp_connection_a7236c6ac291df030f5dab9a4c0365da9}

\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_network_1_1_grid_tcp_connection_a3e60a2b7b54de8586b08eb7d4f6672b5}{static boost\-::shared\-\_\-ptr\\*
$<$ \hyperlink{class_network_1_1_grid_tcp_connection}{Grid\-Tcp\-Connection}\\*
$<$ Message\-Request, \\*
Message\-Response $>$ $>$ \hyperlink{class_network_1_1_grid_tcp_connection_a3e60a2b7b54de8586b08eb7d4f6672b5}{Create} (asio\-::io\-\_\-service \&io\-\_\-service, \hyperlink{class_network_1_1_behavior_handler}{Behavior\-Handler}$<$ Message\-Request, Message\-Response $>$ $\ast$handler)}\label{class_network_1_1_grid_tcp_connection_a3e60a2b7b54de8586b08eb7d4f6672b5}

\begin{DoxyCompactList}\small\item\em Create a new connection (boost\-::shared pointer) \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$class Message\-Request, class Message\-Response$>$class Network\-::\-Grid\-Tcp\-Connection$<$ Message\-Request, Message\-Response $>$}

Wrapper around boost T\-C\-P socket A\-P\-I Messages model must be specified. 

The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
gremlins\-\_\-static/\hyperlink{_grid_tcp_connection_8h}{Grid\-Tcp\-Connection.\-h}\end{DoxyCompactItemize}
